<?php

namespace app\common\validate;

use app\common\validate\Base;

class Address extends Base
{

    protected $rule = [
        'id|地址ID' => 'require|integer',
        'mid|用户名' => 'require',
        'city|省市县' => 'require',
        'uname|收件人' => 'require|chs',
        'mphone|手机号码' => 'require|number',
        'address|街道地址' => 'require',
        'title|标题' => 'require'
    ];

    protected $message = [
    ];

    protected $scene = [
        // 用户添加地址
        'home_add' => ['city','uname','mphone','address','title'],
        // 用户修改地址
        'home_edit' => ['id','mid','city','uname','mphone','address','title'],
    ];


}